<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <!-- <button v-on:click="myClick">切换</button> -->
        <button @click="myClick">切换</button>
        <div v-show="flag">
            {{msg}}
        </div>
    </div>
</body>
<script src="./vue.min.js"></script>
<script>
    new Vue({
        el:"#app",
        data:{
            msg:"你好",
            flag:true
        },
        methods: {
            myClick(){
              console.log(666);
              this.flag = !this.flag;
             
            }
        },
    })
</script>
</html>